package com.naiterui.ehp.bs.doctor.prodocl;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 宣教消息对象
 * @author YongYang
 * @since 1.0.0
 */
public class Education implements IChecker, Serializable {

	/**
	 * 字段或域定义：<code>serialVersionUID</code>
	 */
	private static final long serialVersionUID = -1006639677873531820L;
	
	/**
	 * LOGGER
	 */
	private static final Logger LOGGER = LoggerFactory.getLogger(Education.class);

	
    private Long eduId;

    private String eduTitle;

    private String eduUrl;

    private String eduOrigin;

    private String text;

    private Integer read;
	
	
    public Long getEduId() {
        return eduId;
    }

    public void setEduId(Long eduId) {
        this.eduId = eduId;
    }

    public String getEduTitle() {
        return eduTitle;
    }

    public void setEduTitle(String eduTitle) {
        this.eduTitle = eduTitle;
    }

    public String getEduUrl() {
        return eduUrl;
    }

    public void setEduUrl(String eduUrl) {
        this.eduUrl = eduUrl;
    }

    public String getEduOrigin() {
        return eduOrigin;
    }

    public void setEduOrigin(String eduOrigin) {
        this.eduOrigin = eduOrigin;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Integer getRead() {
        return read;
    }

    public void setRead(Integer read) {
        this.read = read;
    }

	@Override
  public boolean selfValidate() {
        
        if (StringUtils.isEmpty(eduId + "")) {
            LOGGER.error("eud message has no available eduId!");
        	return false;
        }
        if (StringUtils.isEmpty(eduUrl)) {
            LOGGER.error("eud message has no available eduUrl!");
            return false;
        }

        if (StringUtils.isEmpty(eduTitle)) {
            LOGGER.error("eud message has no available eduTitle!");
            return false;
        }
        
		return true;
	}

}
